package com.szewec.ps.model.project;

import android.text.TextUtils;

import com.szewec.ps.model.Meta;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class ProjectListModel {

    private Meta meta;
    private String msg;
    private List<ProjectModel> data;
    private Integer code;

    public static class ProjectModel implements Serializable {
        private String id;
        private String projectCode;
        private String projectName;
        private Integer projectTypeGrade1;
        private Integer projectTypeGrade2;
        private String projectDesc;
        private String researchArea;
        private Long createTime;
        private List<ProjectMemberListModel.ProjectMemberModel> projectMemberList;
        private List<ProjectMemberListModel.ProjectMemberModel> projectChargeList;

        static public String getNameStrWithProjectList(List<SelectUserModel> list, String delimiter){
            if (list == null){
                return "";
            }

            List<String> nameList = new ArrayList<>();
            for(SelectUserModel model : list){
                nameList.add(model.getName());
            }
            return TextUtils.join(delimiter, nameList);
        }

        public String getId() {
            return id;
        }
        public void setId(String id) {
            this.id = id;
        }
        public String getProjectCode() {
            return projectCode;
        }
        public void setProjectCode(String projectCode) {
            this.projectCode = projectCode;
        }
        public String getProjectName() {
            return projectName;
        }
        public void setProjectName(String projectName) {
            this.projectName = projectName;
        }
        public String getProjectDesc() {
            return projectDesc;
        }
        public void setProjectDesc(String projectDesc) {
            this.projectDesc = projectDesc;
        }
        public String getResearchArea() {
            return researchArea;
        }
        public void setResearchArea(String researchArea) {
            this.researchArea = researchArea;
        }
        public List<ProjectMemberListModel.ProjectMemberModel> getProjectMemberList() {
            return projectMemberList;
        }
        public void setProjectMemberList(List<ProjectMemberListModel.ProjectMemberModel> projectMemberList) {
            this.projectMemberList = projectMemberList;
        }
        public List<ProjectMemberListModel.ProjectMemberModel> getProjectChargeList() {
            return projectChargeList;
        }
        public void setProjectChargeList(List<ProjectMemberListModel.ProjectMemberModel> projectChargeList) {
            this.projectChargeList = projectChargeList;
        }
        public Integer getProjectTypeGrade1() {
            return projectTypeGrade1;
        }
        public void setProjectTypeGrade1(Integer projectTypeGrade1) {
            this.projectTypeGrade1 = projectTypeGrade1;
        }
        public Integer getProjectTypeGrade2() {
            return projectTypeGrade2;
        }
        public void setProjectTypeGrade2(Integer projectTypeGrade2) {
            this.projectTypeGrade2 = projectTypeGrade2;
        }
        public Long getCreateTime() {
            return createTime;
        }
        public void setCreateTime(Long createTime) {
            this.createTime = createTime;
        }


    }


    public Meta getMeta() {
        return meta;
    }
    public void setMeta(Meta meta) {
        this.meta = meta;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
    public List<ProjectModel> getData() {
        return data;
    }
    public void setData(List<ProjectModel> data) {
        this.data = data;
    }
    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
}
